use std::ptr;
fn main() {
    let ptr: *mut u8 = ptr::null_mut();
    let t: *mut u8 = ptr;
}

// +-----+        +-----+
// |     |        |     |
// | ptr |        |  t  |
// |     |        |     |
// +--+--+        +--+--+
//    |              |
//    |              |
//    +---->NULL<----+


pub fn main0() {
    let ptr: *mut u8 = ptr::null_mut();
    let t: *const *mut u8 = &ptr;
    println!("{:?} {:?}", ptr, t);

    println!("{:x}", do_not_dereference_this_result())
}

// +-----+      +-----+
// |     |      |     |
// |  t  +------> ptr +----->NULL
// |     |      |     |
// +-----+      +-----+

fn do_not_dereference_this_result () -> usize {
     let val: u8 = 127;
     let ptr : *const u8 = &val;
     ptr as usize
}

